#ifndef AUTHORITYMANAGER_H
#define AUTHORITYMANAGER_H
#include <QString>
#include "singleton.h"
#include <QDateTime>
class AuthorityManager: public Singleton<AuthorityManager>
{
public:
    AuthorityManager();
    typedef enum _AUTH_LEVEL
    {
        AUTH_USER,
        AUTH_RD,
        AUTH_ADMIN,
    }AUTH_LEVEL;

    AUTH_LEVEL getCurrentLevel();

    bool checkUserPwd(QString user, QString pwd);
protected:
    friend class Singleton<AuthorityManager>;
    AUTH_LEVEL m_level;
    QDateTime m_time;
	QMap<QString, QString> parsePasswordConfig(const QString &filePath);
};

#endif // AUTHORITYMANAGER_H
